package com.cskaoyan.controller.vx.topic;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.vxVo.topic.TVO;
import com.cskaoyan.bean.vo.vxVo.topic.WXTopicDetailVo;
import com.cskaoyan.bean.vo.vxVo.topic.WXTopicRelatedVo;
import com.cskaoyan.service.vx.topic.WXTopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 陈慧颖
 * @time: Created by chy on 2022/6/7 20:28
 */
@RestController
@RequestMapping("wx/topic")
public  class WXTopicController{
    @Autowired
    WXTopicService wxTopicService;

    /**
     * GET /wx/top/list 接口;
     * @return
     */
    @RequestMapping("list")
    public BaseRespVo list(){

        return null;
    }
    /**
     *  GET  /wx/topic/detail  ; 参数为 id;
     */
    @RequestMapping("detail")
    public  BaseRespVo detail(Integer id){
        WXTopicDetailVo wxTopicDetailVo =  wxTopicService.detail(id);
        return BaseRespVo.ok(wxTopicDetailVo);
        }
    /**
     *GET   /wx/topic/related?id=359
     *
     * @param id
     * @return
     */
    @RequestMapping("related")
    public  BaseRespVo related(Integer id){ //
        TVO<WXTopicRelatedVo> wxTopicRelatedVoTVO   =     wxTopicService.related(id);


        return BaseRespVo.ok(wxTopicRelatedVoTVO);
    }
}
